package com.xiaoyu.awakening.deepdoc.api;

import com.xiaoyu.awakening.common.core.dto.Result;
import com.xiaoyu.awakening.deepdoc.dto.AwkOCRFile2TextDto;
import org.springframework.web.bind.annotation.*;

/**
 * IDeepdocOcrControllerApi
 *
 * @author wangxiaoyu
 * @since 1.0
 **/
@RequestMapping("/api/v1/parse")
public interface IDeepdocParseControllerApi {

    @GetMapping(value = "/getFileFormat")
    Result<Boolean> getFileFormat(@RequestParam byte[] file);

    @GetMapping(value = "/file2text")
    Result<AwkOCRFile2TextDto> file2text(@RequestParam byte[] file, @RequestParam(required = false) String fileFormat);

    @PostMapping(value = "/fileUrl2text")
    Result<AwkOCRFile2TextDto> fileUrl2text(@RequestParam String fileUrl, @RequestParam(required = false) String fileFormat);
}
